@include('admin.public.head')
@include('admin.public.pop')

<style type="text/css">
    .inner_btn {
        background: #19a97b;
        color: white;
        padding: 5px 8px;
        border-radius: 2px;
    }
</style>

<div class="ibox-title">
    <h3>等级管理</h3>
    <h4>注意：等級表謹慎操作，會員每次授權登錄以及簽到都會重新計算一次積分并且拿該等級列表的數據重置該會員的等級</h4>
</div>

<div class="ibox-content">

    @if(permission('/level_add', $user['right_list'], $user['get_routes']))
        <div class="row">
            <div class="col-sm-12 clear">
                <div class="" style="margin: 15px 10px">
                    <a href="/level_add" class="btn btn-w-m btn-primary">新增</a>
                </div>
            </div>
        </div>
    @endif

    <table class="table table-bordered">
        <thead>
        <tr>
            <th>等级名称</th>
            <th>该等级经验值下限</th>
            <th>等级折扣(购买课程)</th>
            <th>级别</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        @foreach ($headhunting_commission_level as $v)
            <tr>
                <td>{{$v->rank_name}}</td>
                <td>{{$v->rank_min}}</td>
                <td>{{$v->buy_discount}}</td>
                <td>{{$v->level}}</td>
                <td>
                    @if(permission('/level_edit', $user['right_list'], $user['get_routes']))
{{--                        <div class="btn-group">--}}
{{--                            <a class="btn btn-primary btn-sm dropdown-toggle" href="/level_edit/{{$v->id}}">編輯--}}
{{--                            </a>&nbsp;&nbsp;--}}
{{--                        </div>--}}
                    @endif

                    @if(permission('/level_del', $user['right_list'], $user['get_routes']))
                        <div class="btn-group">
                            <a class="btn btn-primary btn-sm dropdown-toggle" href="javascript:void(0)"
                               onclick="del($(this))" url="/level_del/{{$v->id}}">刪除
                            </a>&nbsp;&nbsp;
                        </div>
                    @endif
                </td>
            </tr>
        @endforeach
        </tbody>
    </table>
</div>

